#include <QtGui>

#include "numeric_label.h"
#include "invader_label.h"

NumericLabel::NumericLabel (const QString &label, QWidget *parent)
  : QFrame (parent)
{
  _label = new InvaderLabel (label, this);
  _valueLabel = new InvaderLabel ("0", this);
  _value = 0;

  QHBoxLayout *layout = new QHBoxLayout;
  layout->setSizeConstraint (QLayout::SetFixedSize);

  layout->addWidget (_label);
  layout->addWidget (_valueLabel);

  setLayout (layout);
}

void NumericLabel::setValue (int value)
{
  _value = value;
  _valueLabel->setText (QString ("%1").arg (value));
}
